from django.conf.urls.defaults import patterns, include, url
from django.views.generic import TemplateView, ListView, DetailView

from app.models import Studiengang
from app.views import ModulDetailView, StudiengangDetailView

urlpatterns = patterns('app.views',
    url(r'^$', TemplateView.as_view(template_name="index.html"), name='index'),
    url(r'^studiengaenge$', ListView.as_view(model=Studiengang), name='studiengaenge'),
    url(r'^semester$', TemplateView.as_view(template_name="semester.html"), name='semester'),

    url(r'^studiengaenge/(?P<pk>\d+)/$', StudiengangDetailView.as_view(), name='studiengang_view'), 
    url(r'^module/(?P<pk>\d+)/$', ModulDetailView.as_view(), name='modul_view'),
)

